Chart = {
	genChart: function(container, width, height) {
		container.charts.forEach(function(k, v) {
			var h = $("#chart_canvas_view #" + k).highcharts();
			if (h) h.destroy();
		});
		
		var i = 0;
    	Vari.rpt.data.forEach(function(series) {
    		var eleId = "chart_" + i;
    		if ($("#chart_canvas_view #" + eleId).length == 0) {
    			$("<div id=" + eleId + " style='width: " + width +"; height: " + height + "'>").appendTo($("#chart_canvas_view"));
    		}
    		
    		$("#chart_canvas_view #" + eleId).highcharts({
    	            chart: {
    	                type: 'bar'
    	            },
    	            title: {
    	                text: Vari.rpt.names[i]
    	            },
    	            subtitle: {
    	                text: ''
    	            },
    	            xAxis: {
    	                categories: Vari.rpt.ticks[i],
    	                title: {
    	                    text: null
    	                }
    	            },
    	            yAxis: {
    	                min: 0,
    	                title: {
    	                    text: '',
    	                    align: 'high'
    	                },
    	                labels: {
    	                    overflow: 'justify'
    	                }
    	            },
    	            tooltip: {
    	                valueSuffix: ''
    	            },
    	            plotOptions: {
    	                bar: {
    	                    dataLabels: {
    	                        enabled: true
    	                    },
    	                    animation: false
    	                }
    	            },
    	            legend: {
    	                layout: 'vertical',
    	                align: 'right',
    	                verticalAlign: 'top',
    	                x: -100,
    	                y: 100,
    	                floating: true,
    	                borderWidth: 1,
    	                backgroundColor: '#FFFFFF',
    	                shadow: true
    	            },
    	            credits: {
    	                enabled: false
    	            },
    	            series: [{
    	            	name: "count",
    	                data: series,
    	                showInLegend: false
    	            }],
    	            colors: [
    	            	'#1aadce'
    	            ]

    	        });
    		container.charts.set(eleId, eleId);
    		i++;
    	});
	},
};